package com.clm.mapper;

import com.clm.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @Author dinghuapeng
 * @Date 2023/11/5 19:21
 * @PackageName:com.clm.mapper
 * @ClassName: UserMapper
 * @Description: TODO
 * @Version 1.0
 */
@Mapper
public interface UserMapper {

    /**
     * 根据Openid查询用户信息
     * @param openid
     * @return
     */
    @Select("select * from user where openid = #{openid}")
    User getUserByOpenid(String openid);

    /**
     * 插入新注册的用户数据
     * @param user
     */
    void insert(User user);

    /**
     * 获取用户信息
     * @param userId
     * @return
     */

    User getById(Long userId);


}
